#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
int n, k;
int w[N];
double sum = 0;
int main() {
  int tc;
  scanf("%d", &tc);
  while (tc--) {
    scanf("%d%d", &n, &k);
    sum = 0;
    for (int i = 0; i < n; ++i) scanf("%d", &w[i]), sum += w[i];
    for (int i = 0; i < n; ++i) printf("%.10f ", w[i] + k * (w[i] / sum));
    putchar('\n');
  }
}
